﻿//Copyright (C) <2013>  <jonathan cleeve norton> All Rights Reserved 
//Contact jon.norton@fin-plus.co.uk website <http://www.fin-plus.co.uk/>
using FinPlusInterfaces;
using FinPlusBaseCore;

namespace FinPlusRTDQuery
{
    public class ExcelQuery
    {
        public IQuery Query { get; set; }

        private string[] _fields;
        private string[] _order;

        public ExcelQuery(IQuery query, string fields, string order)
        {
            Query = query;
            _fields = fields.Split(',');
            _order = order.Split(',');
        }

        public string GetDisplay(BeanField fieldType) { return Query.Values.Display(fieldType, _fields, _order); }
    }
}
